<?php

	namespace application\model;

		class Recipe
		{
			// String

			private $recipeID;
			private $recipeName;
			private $instructions;
			private $recipeType;
			private $recipeTypeID;
			private $author;
			private $authorID;
			private $recipeTags;

			public function __construct($recipeID, $recipeName, $instructions, $recipeType, $recipeTypeID, $author, $authorID, $recipeTags)
			{
				//Trimma??
				//$userNameInput = trim($userNameInput);
				//$userPassWInput =trim($userPassWInput);
				//
				 if ($recipeName == "")
				 {
					 throw new \Exception("Har du glömt fylla i recpetets namn?");
				 }
				 if ($instructions == "")
				 {
					 throw new \Exception("Har du glömt fylla i instruktionerna?");
				 }
				 if ($recipeTypeID == "")
				 {
					 throw new \Exception("Har du glömt fylla i vilken Typ receptet är?");
				 }
				 if ($authorID == "")
				 {
					 throw new \Exception("Har du glömt fylla i Författaren?");
				 }

				$this->recipeID = $recipeID;
				$this->recipeName = $recipeName;
				$this->instructions = $instructions;
				$this->recipeType = $recipeType;
				$this->author = $author;
				$this->recipeTypeID = $recipeTypeID;
				$this->authorID = $authorID;
				$this->recipeTags = $recipeTags;

				
			}


			public function getRecipeID()
			{
				return $this->recipeID;
			}


			public function getRecipeName()
			{
				return $this->recipeName;
			}


			public function getRecipeInstructions()
			{
				return $this->instructions;
			}


			public function getRecipeType()
			{
				return $this->recipeType;
			}


			public function getRecipeTypeID()
			{
				return $this->recipeTypeID;
			}


			public function getRecipeTags()
			{

				return $this->recipeTags;
			}


			public function getRecipeAuthor()
			{
				return $this->author;
			}


			public function getRecipeAuthorID()
			{
				return $this->authorID;
			}


		}
